﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Collections.Specialized;

namespace VSCleaner.Common
{
    /// <summary>
    /// A Class that represents all extension methods used
    /// </summary>
    public static class Extensions
    {
        /// <summary>
        /// Converts an ObservableCollection<string> to String Collection
        /// </summary>
        /// <param name="collection">ObservableCollection<string></param>
        /// <returns>StringCollection</returns>
        public static StringCollection ToStringCollection(this ObservableCollection<string> collection)
        {
            var stringCollection = new StringCollection();

            foreach (var item in collection)
            {
                stringCollection.Add(item);
            }

            return stringCollection;
        }
    }
}
